{% extends "layout.html" %}
{% block body %}
<div id="main" class="container">
    <h2>All Items</h2>
    <table class="table table-hover">
      <tr>
        <th>#
        <th>Title
        <th>Date
        <th>Text
      {%- for todo in todos %}
      <tr class={{ "success" if todo.done }}>
        <td><a href="/todos/{{ todo.id }}">{{ todo.id }}</a>
        <td style={{ "text-decoration:line-through" if todo.done }}>{{ todo.title }}
        <td>{{ todo.pub_date.strftime('%Y-%m-%d %H:%M') }}
        <td>{{ todo.text }}</td>
      {%- endfor %}
    </table>
    <p>
      <a href="{{ url_for('new') }}" class="btn btn-large btn-primary">New Todo</a>

  
</div>
{% endblock %}
